package com.momo.common.res.authority;

import com.google.common.collect.Lists;
import com.momo.mapper.dataobject.AclDO;
import com.momo.mapper.dataobject.AclModuleDO;
import lombok.*;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * Created by Kagome on 2019/3/23.
 */
@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=true,of = {"id"})
public class AclModuleLevelDto extends AclModuleDO{

    private List<AclModuleLevelDto> aclModuleList = Lists.newArrayList();

    private List<AclDto> aclList = Lists.newArrayList();
    // 是否要默认选中
    private boolean checked = false;
    public static AclModuleLevelDto adapt(AclModuleDO aclModule) {
        AclModuleLevelDto dto = new AclModuleLevelDto();
        BeanUtils.copyProperties(aclModule, dto);
        return dto;
    }

}
